<%-- 
    Document   : index
    Created on : Dec 11, 2009, 10:19:18 PM
    Author     : fdcube
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <script type="text/javascript" src="jquery/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="jquery/jquery-ui-1.7.2.cusms.min.js"></script>
        <link href="jquery/jquery-ui-1.7.2.cusms.css" rel="stylesheet" type="text/css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>客户管理系统</title>
        <script type="text/javascript">
            $(document).ready(
            function() {
                $.getJSON("cus/list.action",
                function(data) {
                    var span = "<div style='width:150px;float:left'></div>";
                    $.each(data.jsonArray, function(i,customer) {
                        var div = $("<div style='position:relative;float:left;'></div>").attr("id", customer.cid);
                        div.appendTo("#gridcontent");
                        $(span).append(customer.cid).appendTo("#" + customer.cid);
                        $(span).append(customer.cname).appendTo("#" + customer.cid);
                        $(span).append(customer.cmail).appendTo("#" + customer.cid);
                        $(span).append(customer.cphone).appendTo("#" + customer.cid);
                        $(span).append(customer.cbirthday).appendTo("#" + customer.cid);
                    }
                )
                }
            )
            }
        )
        </script>
    </head>
    <body>
        <div id="grid">
            <div id="gridtitle" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
                <span>ID</span>
                <span>姓名</span>
                <span>邮箱</span>
                <span>电话</span>
                <span>生日</span>
            </div>
            <div id="gridcontent" style=""></div>
        </div>
    </body>
</html>
